
/*------------------------------------------------------------------*/

/*------------------------------------------------------------------*/


#ifndef		__PINCFG_H
#define		__PINCFG_H

#include "sys_ext.h"

#define WR_DBG_EN                                1
#define WR_PROTECT_EN                            0

//------------------------------pin function define---------------------------//
#define KEY1            PCin(15)
#define KEY2            PCin(14)
#define KEY3            PCin(13)
#define KEY4            PBin(3)
#define KEY5            PBin(4)
#define KEY6            PBin(5)
#define KEY7            PAin(12)
#define KEY8            PAin(15)

#define RS485_DE        PAout(11)
#define RS485_RT        PA9_PA10

#define LD_DAT          PA0_PA7
#define LD_RST          PBout(0)
#define LD_PWR

#define LD_CS1   		PBout(15)
#define LD_DC1   		PBout(14)
#define LD_WR1   		PBout(13)
#define LD_RD1   		PBout(12)

#define LD_CS2   		PAout(15)
#define LD_DC2   		PBout(3)
#define LD_WR2   		PBout(4)
#define LD_RD2   		PBout(5)

#if   defined ( __ICCARM__ )
#define __nop() asm("nop")
#define _nop_() asm("nop")
#else
#define _nop_() __nop()
#endif

#define NOP1()  _nop_()
#define NOP2()  NOP1();NOP1()
#define NOP3()  NOP2();NOP1()
#define NOP4()  NOP3();NOP1()
#define NOP5()  NOP4();NOP1()
#define NOP6()  NOP5();NOP1()
#define NOP7()  NOP6();NOP1()
#define NOP8()  NOP7();NOP1()
#define NOP9()  NOP8();NOP1()
#define NOP10() NOP9();NOP1()
#define NOP11() NOP10();NOP1()
#define NOP12() NOP11();NOP1()
#define NOP13() NOP12();NOP1()
#define NOP14() NOP13();NOP1()
#define NOP15() NOP14();NOP1()
#define NOP16() NOP15();NOP1()
#define NOP17() NOP16();NOP1()
#define NOP18() NOP17();NOP1()
#define NOP19() NOP18();NOP1()
#define NOP20() NOP19();NOP1()
#define NOP21() NOP20();NOP1()
#define NOP22() NOP21();NOP1()
#define NOP23() NOP22();NOP1()
#define NOP24() NOP23();NOP1()
#define NOP25() NOP24();NOP1()
#define NOP26() NOP25();NOP1()
#define NOP27() NOP26();NOP1()
#define NOP28() NOP27();NOP1()
#define NOP29() NOP28();NOP1()
#define NOP30() NOP29();NOP1()
#define NOP31() NOP30();NOP1()
#define NOP32() NOP31();NOP1()
#define NOP33() NOP32();NOP1()
#define NOP34() NOP33();NOP1()
#define NOP35() NOP34();NOP1()
#define NOP36() NOP35();NOP1()
#define NOP37() NOP36();NOP1()
#define NOP38() NOP37();NOP1()
#define NOP39() NOP38();NOP1()
#define NOP40() NOP39();NOP1()
#define NOP(N)  NOP##N()


#endif
